import request from '@/utils/request'
import requestImg from '@/utils/requestImg'
const baseUrl = '/cz-rentbox/api/v1/' 

// ### 租箱服务 -- 购箱记录
export const boxRecords = (data:any) =>{
    return request({
      url: baseUrl+'buyBoxRecords/page',
      method: 'POST',
      data: data
    })
  }
// ### 购箱记录:新增
export const buyBoxRecords = (data:any) =>{
  return request({
    url: baseUrl + "/buyBoxRecords",
    method: 'POST',
    data: data
  })
}
//### 购箱记录:修改
export const editBoxRecords = (data:any) =>{
  return request({
    url: baseUrl + "buyBoxRecords",
    method: 'PUT',
    data: data
  })
}
// ### 购箱记录:导入
export const recordsUpload = (data:any) =>{
  return requestImg({
    url: baseUrl + "buyBoxRecords/upload",
    method: 'POST',
    data: data
  })
}
// ### 删除购箱记录
export const deleteBuyBoxRecords = (data:any) =>{
  return request({
    url: baseUrl + "/buyBoxRecords",
    method: 'DELETE',
    data: data
  })
}
// ### 购箱记录:导出Excel
export const exportBuyBoxRecord = (data:any) =>{
  return request({
    responseType: 'blob',
    url: baseUrl + "/buyBoxRecords/exportBuyBoxRecord",
    method: 'POST',
    data: data
  })
}